package com.dckeji.shiplock.webapp.conf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

/**
 * Created with IntelliJ IDEA.
 * User: TianWei
 * Date: 2017/7/28
 * Time: 18:45
 */
@Configuration
@ComponentScan(basePackages = {"com.dckeji.shiplock"})
//加载配置文件读取配置文件直接@Value(key)
@PropertySource(value = {"classpath:application.properties"})
public class RootConfig {
    @Bean
    public static PropertySourcesPlaceholderConfigurer propertyConfigInDev() {
        return new PropertySourcesPlaceholderConfigurer();
    }

}
